Skip to content

Conversation

wizard97
Copy link

Updating irq_ctrl to support greater than 64 IRQs. Also allows user to set N_IRQSdefine that overrides the default of 32.

Basically just switch from uint64_t irq_status to uint64_t irq_status[].

Copy link
Contributor

@aescolar aescolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your interest in contributing @wizard97
Please note that for a contribution to be considered, its commits need to be signed off:
https://github.com/BabbleSim/native_simulator?tab=readme-ov-file#developer-certification-of-origin-dco

Why do you want to change this?
The content of native/src is optional, and if you want more than 64 interrupts I presume you have other HW models(?). In which case you may as well just have a different interrupt controller provided from your code. See for ex. how the nRF HW models include their own evolution of this irq_controller which supports N interrupts and M irq controller instances: https://github.com/BabbleSim/ext_nRF_hw_models/blob/main/src/HW_models/irq_ctrl.c

Signed-off-by: Aaron Wisner <[email protected]>
@wizard97
Copy link
Author

Thanks for the cool project! I'm interested in upstreaming some fixes (more to come) that might benefit other users.

Please note that for a contribution to be considered, its commits need to be signed off:

All set! Amended the commit with the signature.

Why do you want to change this? The content of native/src is optional, and if you want more than 64 interrupts I presume you have other HW models(?). In which case you may as well just have a different interrupt controller provided from your code

I guess what I am missing is why one would want to have to fork core peripherals (e.g. timer, irq controller) if from an API and behavioral perspective they are the same? The models in native/src are very generic and should apply to most platforms I would think? Looking at the files you pointed me at it looks like basically a copy paste of the one in native/src with some changes to also support > 64 interrupts (among other things)?

I'm actually curious why irq_ctrl and timer stuff was forked in ext_nRF_hw_models in the first place?

I presume you have other HW models?

Yes indeed, but we are still leveraging these core models in native/src :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants